//
// Created by lz on 3/1/21.
//
#include "net/Poller.h"
#include "net/poller/PollPoller.h"
#include "net/poller/EpollPoller.h"

#include <cstdlib>

using namespace lzweb::net;


Poller* Poller::newDefaultPoller(EventLoop* loop)
{
	if (::getenv("LZWEB_USE_POLL"))
	{
		return new PollPoller(loop);
	}
	else
	{
		return new EpollPoller(loop);
	}
}
